package com.demo.resourcecode.c10tx;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainTest2 {

	public static void main(String[] args) throws Exception{
		ApplicationContext act = new ClassPathXmlApplicationContext("tx2.xml");
		UserServiceImpl2 userService = (UserServiceImpl2)act.getBean("userService");
		Test t = new Test();
		t.setId(3);
		t.setName("zsl3");
		userService.save(t);
	}

}
